import { createApp } from 'vue'
//引入Element-Plus插件及样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//@ts-expect-error忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import App from '@/App.vue'
//引入SVG图标
import 'virtual:svg-icons-register'
//引入自定义插件对象：注册整个项目全局组件
import globalComponents from '@/components/index'
//引入全局样式
import '@/styles/index.scss'
//引入路由组件
import router from './router'
//引入仓库
import pinia from './store'
//引入路由守卫
import './permisstion'

//获取应用对象的实例
const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
//安装pinia
app.use(pinia)
//安装路由插件
app.use(router)
//安装自定义插件
app.use(globalComponents)
//安装element-plus插件
app.use(ElementPlus)
//将应用挂载到挂载点了
app.mount('#app')

